.icon-button {
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: var(--swm-button-size);
  background: none;
  border: 0px solid transparent;
  border-radius: 8px; /* Use a smaller value for pill/rounded rectangle */
  color: var(--swm-icon-button);
  transition: all 200ms 0ms ease-in-out;
  flex-shrink: 0;
}

.icon-button-left {
  min-width: none;
  padding-left: 4px;
  padding-right: 1px;
  border-radius: 8px 0px 0px 8px;
}

.icon-button-right {
  min-width: none;
  padding-left: 1px;
  padding-right: 4px;
  border-radius: 0px 8px 8px 0px;
}

.icon-button-default {
  min-width: var(--swm-button-size);
}

.icon-button:disabled {
  cursor: default;
  pointer-events: none;
  color: var(--swm-button-disabled);
}

.icon-button:hover {
  color: var(--swm-icon-button-hover);
  background-color: var(--swm-icon-button-hover-background);
}

.icon-button:active {
  color: var(--swm-icon-button-active);
  background-color: var(--swm-icon-button-active-background);
  transform: scale(0.9);
}

.icon-button:focus {
  box-shadow: var(--swm-focus-outline);
}

.icon-button-selected {
  color: var(--swm-button-selected);
  background-color: var(--swm-button-selected-background);
}

.icon-button-selected:hover {
  color: var(--swm-button-selected-hover);
  background-color: var(--swm-button-selected-hover-background);
}

.icon-button-secondary {
  color: var(--swm-button-secondary);
  background-color: var(--swm-button-secondary-background);
}

.icon-button-secondary:hover {
  background-color: var(--swm-button-secondary-hover);
}

.icon-button-counter {
  border: 0px solid transparent;
  border-radius: 4px;
  color: var(--swm-button-counter);
  background-color: var(--swm-button-counter-background);
  border: 1px solid var(--swm-button-counter-border);
  padding: 2px 4px;
  font-size: 10px;
  position: absolute;
  top: 20%;
  left: 20px;
  opacity: 0;
  transform: translateY(-50%);
  transition:
    left 200ms ease-in-out,
    opacity 200ms ease-in-out;
}

.icon-button-counter.visible {
  top: 20%;
  opacity: 1;
}

.icon-button-indicator {
  box-sizing: border-box;
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: var(--swm-button-counter-background, #ff5555);
  border-radius: 50%;
  border: 1px solid var(--swm-button-counter-border, transparent);
  transform: scale(0);
  transition: transform 175ms ease-in-out;
}

.icon-button-indicator.visible {
  transform: scale(1);
}

.icon-button-indicator.ping {
  animation: ping 300ms cubic-bezier(0, 0, 0.2, 1);
}

@keyframes ping {
  50% {
    transform: scale(1.2);
  }
}
